<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title><spring:message code="template.show"/></title>
	<meta name="decorator" content="default"/>
    <style>
        .tu-con{}
        .tu-con .tu-con-sou{float: left; background: #3bb3e0;position: relative;font-size: 25px;}
        .tu-con .tu-con-sou .tu-con-item{position: absolute;}
    </style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active">
            <a href="${ctx}/templet/eleTemplet/info?id=${eleTemplet.id}">模板展示</a>
        </li>
	</ul>
	<form:form id="inputForm" modelAttribute="eleTemplet" action="${ctx}/templet/eleTemplet/save" method="post" class="breadcrumb form-search">
		<form:hidden id="eleTempletId" path="id"/><form:hidden path="flag"/>
		<sys:message content="${message}"/>
        <ul class="ul-form">
            <li><label><spring:message code="template.name"/>：</label>
                <label>${eleTemplet.name}</label>
            </li>
            <li><label><spring:message code='menu.device.Equipment_Type'/>：</label>
                <label>${eleTemplet.type.name}</label>
            </li>
            <li><label><spring:message code='common.resolution'/>：</label>
                <label>${eleTemplet.width} X ${eleTemplet.height}</label>
            </li>
            <li><label><spring:message code='common.remarks'/>：</label>
                <label>${eleTemplet.remarks}</label>
            </li>
        </ul>
        <div class="ul-form tu-con">
            <div class="tu-con-sou" style="width: ${eleTemplet.width}px;height: ${eleTemplet.height}px;">
                <c:forEach items="${eleTemplet.eleTempletSourceList}" var="source">
                    <c:if test="${source.sourceType != 'apk'}">
                        <div title="${source.sourceType}" class="tu-con-item"
                             style="width: ${source.width}px;height: ${source.height}px;
                                     top:${source.yloc}px;left:${source.xloc}px;">
                            <c:if test="${source.sourceType == 'image'
                                        || source.sourceType == 'video'
                                        || source.sourceType == 'direction'
                                        || source.sourceType == 'background'}">
                                <img src="${ctxStatic}/images/source/${source.sourceType}.png"
                                     style="width: ${source.width}px;height: ${source.height}px;line-height: initial;">
                            </c:if>
                            <c:if test="${source.sourceType == 'title'}">这是标题</c:if>
                            <c:if test="${source.sourceType == 'weather'}">这是天气</c:if>
                            <c:if test="${source.sourceType == 'sub'}">这是字幕</c:if>
                            <c:if test="${source.sourceType == 'time'}">12:00:00</c:if>
                            <c:if test="${source.sourceType == 'date'}">2017-06-01</c:if>
                            <c:if test="${source.sourceType == 'week'}">星期四</c:if>
                            <c:if test="${source.sourceType == 'alarm'}"><spring:message code='common.normal'/></c:if>
                            <c:if test="${source.sourceType == 'floor'}">所在楼层</c:if>
                            <c:if test="${source.sourceType == 'floored'}">登记楼层</c:if>
                        </div>
                    </c:if>
                </c:forEach>
            </div>
        </div>
        <div style="float: left;margin-top: 10px;">
            <c:if test="${publish != null && publish.delFlag == 2}">
                <shiro:hasPermission name="templet:eleTemplet:check">
                    <a href="${ctx}/templet/eleTemplet/check?publishId=${publish.id}&delFlag=0"
                       onclick="return confirmx('<spring:message code='tips.agreemodle' />', this.href)"
                       class="btn btn-success" style="margin-left: 30px;">审批通过</a>

                    <a href="${ctx}/templet/eleTemplet/check?publishId=${publish.id}&delFlag=3"
                       onclick="return confirmx('<spring:message code='tips.rejectmodle' />', this.href)"
                       class="btn btn-inverse" style="margin-left: 30px;"><spring:message code="rejected"/></a>
                </shiro:hasPermission>
            </c:if>
        </div>
	</form:form>
</body>
</html>